﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="分厂上报辅料计划.aspx.cs" Inherits="syc.Sale.分厂上报辅料计划" %>

<head runat="server">
    <title></title>
</head>
<body>

 <script type="text/javascript" language="javascript" src="/common.js"></script>
    <form id="form1" runat="server">
    <div id="wintop" class="wintop">分厂辅料采购计划上报-供应处</div>
     <asp:Panel ID="Panel1" runat="server" CssClass="panel">
       <asp:Button ID="Button_New" runat="server" Text="录 入" CssClass="button" 
                onclick="Button_New_Click" UseSubmitBehavior="False" />
        <asp:Button ID="Button_Save" runat="server" Text="保存" CssClass="button" 
                onclick="Button_Save_Click" UseSubmitBehavior="False" Visible="false" />
       <asp:Button ID="Button_Edit" runat="server" Text="修 改" CssClass="button" 
                        UseSubmitBehavior="False" onclick="Button_Edit_Click" />
        <asp:Button ID="Button_Delete" runat="server" Text="删 除" CssClass="button" 
            UseSubmitBehavior="False" onclick="Button_Delete_Click"  OnClientClick="if(!confirm('确认删除该条记录吗?')) return false;"/>     
         <input id="Button" type="button" value="返回"  
             onclick="document.location.href='FuLiao_CaiGou_JiHua_List.aspx'" class="button" />
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" CssClass="panel" Visible="false">
        <table style="width: 70%;font-size:13px;">
         <tr>
                <td width="100" align="right">年度：</td>
                <td valign="top">
                    <asp:DropDownList ID="NianDu" runat="server" AutoPostBack="true" Width="130px">
                        <asp:ListItem>2009</asp:ListItem>
                        <asp:ListItem>2010</asp:ListItem>
                        <asp:ListItem>2011</asp:ListItem>
                        <asp:ListItem>2012</asp:ListItem>
                        <asp:ListItem>2013</asp:ListItem>
                        <asp:ListItem>2014</asp:ListItem>
                        <asp:ListItem>2015</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="text-align: right" width="100">
                    月 份：</td>
                <td valign="top">
                    <asp:DropDownList ID="YueFen" runat="server" AutoPostBack="true" Width="90px">
                        <asp:ListItem Value="0">年度</asp:ListItem>
                        <asp:ListItem Value="1">1月份</asp:ListItem>
                        <asp:ListItem Value="2">2月份</asp:ListItem>
                        <asp:ListItem Value="3">3月份</asp:ListItem>
                        <asp:ListItem Value="4">4月份</asp:ListItem>
                        <asp:ListItem Value="5">5月份</asp:ListItem>
                        <asp:ListItem Value="6">6月份</asp:ListItem>
                        <asp:ListItem Value="7">7月份</asp:ListItem>
                        <asp:ListItem Value="8">8月份</asp:ListItem>
                        <asp:ListItem Value="9">9月份</asp:ListItem>
                        <asp:ListItem Value="10">10月份</asp:ListItem>
                        <asp:ListItem Value="11">11月份</asp:ListItem>
                        <asp:ListItem Value="12">12月份</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="text-align: right" width="100">
                    &nbsp;</td>
                <td valign="top">
                    &nbsp;</td>
            </tr>    
            <tr>
                <td width="100" align="right">辅料名称：
                </td>
                <td valign="top">
                    <asp:DropDownList ID="FuLiao" runat="server" Width="130px" 
                        DataTextField="品名规格" DataValueField="ID" 
                        AutoPostBack="True" 
                        style="margin-bottom: 0px" 
                        onselectedindexchanged="FuLiao_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td style="text-align: right" width="100">
                    生产分厂：</td>
                <td valign="top">
                    <asp:DropDownList ID="FenChang" runat="server" AutoPostBack="True" 
                        DataTextField="名称" DataValueField="ID" 
                        onselectedindexchanged="FuLiao_SelectedIndexChanged" style="margin-bottom: 0px" 
                        Width="90px">
                    </asp:DropDownList>
                </td>
                <td style="text-align: right" width="100">
                    上报计划量：</td>
                <td valign="top">
                    <asp:TextBox runat="server" Width="90px"                         
                        onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" 
                        ID="ShangBaoCaiGouLiang" style="height: 22px"></asp:TextBox>
                </td>
            </tr>    
        </table>
    </asp:Panel>
    <asp:Panel ID="Panel3" runat="server" CssClass="panel2" >
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
    <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#d0d0d0">
	            <tr>
		            <td class="grid-title">分厂上报辅料采购计划</td>
		        </tr>
		        <tr>
		            <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                           ></asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" PageSize="20"
                            AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                            DataSourceID="SqlDataSource1" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="false" 
                            UseAccessibleHeader="False">
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
                            <Columns>
                             <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:Button ID="Button1" runat="server" CommandName="Select" Text="选择" CssClass="hide"/>
                                        <img src="/Icons/online.gif" style="margin-top:2px;" alt="" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False"  
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" 
                                    ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="品名" HeaderText="辅料名称" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="160" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                   
                                <asp:BoundField DataField="规格" HeaderText="规格"  ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="160" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="单位" HeaderText="单位"  ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="160" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                   
                                <asp:BoundField DataField="上报计划采购量" HeaderText="上报计划量" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="上报日期" DataFormatString="{0:d}" HeaderText="上报日期" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="100" Visible="true" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                            </Columns>
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="Label_Total" runat="server" CssClass="grid_totalrows"></asp:Label>
                                </td>
                            </tr>
                       </table>

		            </td>
	            </tr>
            </table>
            

        </div>
    </div>
    </form>
    <script>
        var textboxs = document.getElementsByTagName("input");
        var i;
        for (i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "textbox") {
                textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
                textboxs[i].onfocus = function(e) { this.select(); };
            }
            else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }

        }
        var rows = document.getElementsByTagName("tr");
        for (i = 0; i < rows.length; i++) {

            if (rows[i].className == "grid-row-normal") {
                rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
                rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
                rows[i].onclick = function() { this.firstChild.firstChild.click(); };
            }
        }   

</script>
</body>
</html>
